<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSchoolsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('schools', function (Blueprint $table) {
            $table->increments('id');
            $table->string('code')->notNull()->default('')->comment('主体code');
            $table->string('name')->notNull()->default('')->comment('主体名称');
            $table->string('badge')->notNull()->default('')->comment('校徽');
            $table->string('local_host')->notNull()->default('')->comment('部署域名');
            $table->tinyInteger('local_deploy')->notNull()->default(0)->comment('0-uni部署 1-私有化部署 2-sass部署');
            $table->string('gate_host')->notNull()->default('')->comment('网关域名');
            $table->integer('wx_mch_id')->notNull()->default(0)->comment('商户id');
            $table->tinyInteger('trade_type')->notNull()->default(0)->comment('0-JSAPI 1-H5');
            $table->tinyInteger('scenes')->notNull()->default(0)->comment('场景: 1-高校 2-K12 3-企业 5-商家');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('schools');
    }
}
